﻿CREATE TABLE [dbo].[FUENTE_FINANCIERA](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Descripcion] [nvarchar](50) NOT NULL,
	[Codigo] [nvarchar](6) NOT NULL,
	[IdCentroCosto] [int] NOT NULL,
 CONSTRAINT [PK_dbo.FUENTE_FINANCIERA] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  ForeignKey [FK_dbo.FUENTE_FINANCIERA_dbo.CENTRO_COSTO_IdCentroCosto]    Script Date: 11/17/2014 00:41:42 ******/
ALTER TABLE [dbo].[FUENTE_FINANCIERA]  WITH CHECK ADD  CONSTRAINT [FK_dbo.FUENTE_FINANCIERA_dbo.CENTRO_COSTO_IdCentroCosto] FOREIGN KEY([IdCentroCosto])
REFERENCES [dbo].[CENTRO_COSTO] ([ID])
GO

ALTER TABLE [dbo].[FUENTE_FINANCIERA] CHECK CONSTRAINT [FK_dbo.FUENTE_FINANCIERA_dbo.CENTRO_COSTO_IdCentroCosto]
GO
CREATE NONCLUSTERED INDEX [IX_IdCentroCosto] ON [dbo].[FUENTE_FINANCIERA] 
(
	[IdCentroCosto] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]